package com.stefanini.pe.bbva.iivs.in.dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.stefanini.pe.bbva.iivs.in.dao.iface.HistSolicitudDAO;
import com.stefanini.pe.bbva.iivs.in.to.HistSolicitud;
import com.stefanini.pe.bbva.iivs.in.to.HistSolicitudKey;

public class HistSolicitudDAOImpl extends SqlMapClientDaoSupport implements HistSolicitudDAO {


    public HistSolicitudDAOImpl() {
        super();
    }

    public int deleteByPrimaryKey(HistSolicitudKey key) {
        int rows = getSqlMapClientTemplate().delete("IIVS_TIIVS_HIST_SOLICITUD.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    public void insert(HistSolicitud record) {
        getSqlMapClientTemplate().insert("IIVS_TIIVS_HIST_SOLICITUD.ibatorgenerated_insert", record);
    }
    
    public void insertSelective(HistSolicitud record) {
        getSqlMapClientTemplate().insert("IIVS_TIIVS_HIST_SOLICITUD.ibatorgenerated_insertSelective", record);
    }


    public HistSolicitud selectByPrimaryKey(HistSolicitudKey key) {
        HistSolicitud record = (HistSolicitud) getSqlMapClientTemplate().queryForObject("IIVS_TIIVS_HIST_SOLICITUD.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    public int updateByPrimaryKeySelective(HistSolicitud record) {
        int rows = getSqlMapClientTemplate().update("IIVS_TIIVS_HIST_SOLICITUD.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    public int updateByPrimaryKey(HistSolicitud record) {
        int rows = getSqlMapClientTemplate().update("IIVS_TIIVS_HIST_SOLICITUD.ibatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

	public List selectDynamicWhere(HistSolicitud record) {
		return getSqlMapClientTemplate().queryForList("IIVS_TIIVS_HIST_SOLICITUD.selectDynamicWhere", record);	
	}
}